package top.infopub.mgr.bpa.dao;

import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import top.infopub.mgr.bpa.domain.OtherConLedgerDomain;
import top.infopub.mgr.bpa.domain.OtherConReviewDomain;
import top.infopub.mgr.bpa.vo.ContractManageVo;
import top.infopub.mgr.bpa.vo.OtherConReviewVo;
import top.infopub.model.bpa.Basic;
import top.infopub.model.bpa.ExpenseInvoice;
import top.infopub.model.bpa.OtherContractsReview;
import top.infopub.model.bpa.ProjectAgencyPayment;

import java.util.List;
import java.util.Map;


/**
 * <p>
 * 其他合同评审 Mapper 接口
 * </p>
 *
 * @author astupidcoder
 * @since 2021-06-15
 */
@Repository
public interface OtherContractsReviewDao {

    /**
     * 根据条件查询分页数据
     * @param otherConReviewVo
     * @return
     * @see
     */
    Page<OtherConReviewDomain> selectByDomainWhere(OtherConReviewVo otherConReviewVo);

    /**
     * 其他合同台账
     * @param contractManageVo
     * @return
     * @see
     */
    Page<OtherConLedgerDomain> selectByLedger(ContractManageVo contractManageVo);


    OtherContractsReview findById(String id);

    Basic findByProCode(String proCode);

    List<ProjectAgencyPayment> selectByOtherContracts(@Param("type") String s);

    List<ExpenseInvoice> selectInvoiceByOtherContractsId(@Param("id") String id, @Param("type") String s);

    List<Map<String, String>> projectDropDownBox();


    void insertOtherContractsReview(OtherContractsReview othercontractsReview);

    void insertExpenseInvoice(ExpenseInvoice expenseInvoice);

    void updateOtherContractsReview(OtherContractsReview othercontractsReview);

    void updateExpenseInvoice(ExpenseInvoice expenseInvoice);

    void saveProjectAgencyPayment(ProjectAgencyPayment projectAgencyPayment);

    void updateProjectAgencyPayment(ProjectAgencyPayment projectAgencyPayment);

    void deleteGenerationPay(String id);

    List<Map<String, String>> companyNameDropDownBox(@Param("types") String types);

    void deleteProjectAgencyPayment(String id,String type);

    void insertProjectAgencyPayment(List<ProjectAgencyPayment> projectAgencyPaymentList);

    List<ProjectAgencyPayment> selectProjectAgencyPayment(@Param("id") String id,@Param("type")  String s);
}
